package cn.getech.data.development.model.dto;

import cn.getech.data.development.entity.flink.FlinkNodeUnion;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
@ApiModel
public class RealTimeTaskSaveDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("记录id")
    private Integer id;

    @ApiModelProperty("目录id")
    private Integer menuId;

    /**
     * 任务类型，关联枚举类:RealTimeTaskType
     * @see cn.getech.data.development.constant.Constant.RealTimeTaskType#
     */
    @ApiModelProperty("任务类型")
    private Integer taskType;

    @ApiModelProperty("资源id")
    private Integer resourceId;

    @ApiModelProperty("main函数")
    private String mainFunction;

    @ApiModelProperty("参数项")
    private String mainArgs;

    @ApiModelProperty("并行度")
    private Integer parallelism;

    @ApiModelProperty("工作内存")
    private Integer jobManagerMemory;

    @ApiModelProperty("任务内存")
    private Integer taskManagerMemory;

    @ApiModelProperty("插槽数")
    private Integer slot;

    @ApiModelProperty("HDFS地址")
    private String savepointPath;

    @ApiModelProperty("运行状态，0：未运行")
    private Integer runState;

    @ApiModelProperty("锁定状态，1：锁定，0：解锁")
    private Integer lockState;

    @ApiModelProperty("编辑用户id")
    private Integer updatePer;

    @ApiModelProperty("flinkSQL")
    private String flinkSQL;

    @ApiModelProperty("节点关联信息")
    List<FlinkNodeUnion> lineList= Lists.newArrayList();

    /**
     * 缓存数据
     */
    @ApiModelProperty("实时采集任务配置")
    private JSONObject config;

}
